home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
176-200
/
scopedisk180
/
addtools
/
addtools.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
2KB
|
57 lines
AddTools V1.1, by Steve Tibbett
AddTools is a utility for Workbench 2.0, and is completely useless
under 1.3.
It adds items to the "Tools" menu, and when these items are selected,
it runs the program that you have attached to it. This is great for
such things as starting up a terminal, a Shell window, or whatever
other items you want to put here.
It also has the capability to pass arguments to the commands - not the
standard "Workbench" arguments, but rather it gives the spawned program
a CLI-style environment, passing arguments on the command line in one
of two manners.
To use, put the following line in your s:startup-sequence, at some point
AFTER Workbench has been loaded and initialized, and after the Path has
been set. Putting AddTools into the WBStartup drawer will work, but
any program called by AddTools will not have a Path. The line:
RUN >NIL: <NIL: ADDTOOLS
will start up AddTools, sending the [CLI 2] (or whatever) to NIL: so it
doesn't pop open a shell window should one not already be open.
ADDTOOLS looks for a file in S: called "ToolsList", in this format:
Menu Item Title
Command To Execute When Selected
Directory name for command to be called from
Any line starting with "-" or ";" will be ignored. The "ToolsList" supplied
with AddTools is an example of a proper ToolsList, and it's format is
documented there.
To get AddTools to quit, you have to send it an "F" break - you can
do this by typing STATUS to see which process AddTools is, and then
typing BREAK [Process Number] F and AddTools should remove it's menu
items and quit.
The source is included, and compiles on my system just fine. It assumes
that you have the 2.0 includes, which are available with the SAS/C 5.10
compiler package, or directly from Commodore.
The source provides a "Proper" way to spawn a command, giving it an output
window should the command print anything, and taking input, properly. The
RunCommandFromWBArgs() routine may be of use to anybody writing similar
programs.
This program is Public Domain, supplied as is. If you have any questions,
you can get ahold of me on People/Link as STEVEX, Bix as s.tibbett,
or on my BBS at 613-731-3419.